import React from 'react';
import  ReactDOM from 'react-dom';
//  import { Provider } from 'mobx-react';
// import { AppContainer } from 'react-hot-loader';
import { ConfigProvider, message } from 'antd';
import {Route, Switch} from 'react-router'
import {BrowserRouter} from 'react-router-dom';
import './index.css';
import  stores from '../mobx/index.js'
import zhCN from 'antd/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
import OssAuth from './OssAuth';
moment.locale('zh-cn');

/**
 * Mobx全局状态管理
 */
//  import stores from './mobx/index';
const rootNode = document.getElementById('oss-content');
ReactDOM.render(  
<React.StrictMode>
{/* <Provider {...stores}> */}
            <ConfigProvider locale={zhCN}>
                {/* <AppContainer> */}
                    {/*{routers}*/}
                    <BrowserRouter key={Math.random()}>
                        <Switch>
                            <OssAuth/>
                        </Switch>
                    </BrowserRouter>
                {/* </AppContainer> */}
            </ConfigProvider>
        {/* </Provider> */}
</React.StrictMode>
,rootNode);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();

// 模块热替换的 API
// if (module.hot) {
//   module.hot.accept();
// }
